package com.hualan.sfzy.controller.course;

import com.hualan.sfzy.service.course.CourseDetailService;
import com.hualan.sfzy.utils.Result;
import com.hualan.sfzy.vo.CourseDetailVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/CourseDetail")
public class CourseDetailController {

    @Autowired
    private CourseDetailService courseDetailService;

    @GetMapping
    public Result selectDetailById(Integer courseId,Integer userId){
        CourseDetailVo courseDetailVo = courseDetailService.selectDetailById(courseId,userId);

        return Result.success(courseDetailVo);
    }


}
